package com.heima.controller;

import com.heima.pojo.Node;
import com.heima.pojo.dto.PagingQueryDTO;
import com.heima.pojo.vo.PagingVO;
import com.heima.service.NodeService;
import com.heima.service.RegionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/vm-service/node")

@Slf4j
public class NodeController {
    @Autowired
    private RegionService regionService;
    @Autowired
    private NodeService nodeService;


    //查看区域详情
    @GetMapping("/search")
    private PagingVO<Node> getRegion(PagingQueryDTO receiveDto){
        log.info("查看区域详情{}",receiveDto);
        PagingVO<Node> pagingVo = nodeService.getRegion(receiveDto);
        log.info("返回数据{}",pagingVo);
         return  pagingVo;
    }
    //点位搜索

}
